<UserControl 
    x:Class="ibba.src.slcomponentes.ControlMenuBar"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:ibba.src.slcomponentes"         
    MinWidth="500" MinHeight="85" 
    IsTabStop="True">
    
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Border VerticalAlignment="Bottom" >
            <Grid>

                <Border x:Name="brdBarra" VerticalAlignment="Bottom" Height="40" Background="#FF5A7194" BorderBrush="#FF484848" BorderThickness="1" />
                
                <TextBlock Name="txtTitleBar" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="8,0,0,8" 
                           FontSize="16" Foreground="White" Height="24" />

                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
                    <ItemsControl x:Name="botoesMenu">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" Background="Transparent"/>
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <!--<StackPanel Name="ItemMenu"  Margin="5,-20,5,5" VerticalAlignment="Bottom"
                                            MouseLeftButtonDown="StackPanel_MouseLeftButtonDown">-->
                                <local:CustomButtonBar x:Name="cbbBotao" 
                                                       Tag="{Binding Nome}" Content="{Binding Descricao}" Image="{Binding CaminhoImagem}"
                                                       Foreground="#FFFFFFFF" FontSize="11" 
                                                       VerticalAlignment="Bottom"
                                                       Margin="5,-20,5,5" Height="90"
                                                       IsAnimate="{Binding Animado}"
                                                       Click="cbbBotao_Click"/>
                                <!--</StackPanel>-->
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

                </StackPanel>

                <StackPanel Name="panelUsuario" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0" VerticalAlignment="Bottom" >
                    <TextBlock Margin="0,0,2,0" Text="[UsuarioConectado]" VerticalAlignment="Center" Foreground="#FFFFFFFF" MaxWidth="200"
                               Name="txtUser" FontSize="10.555"/>
                    <Image Source="/ibba.src.slcomponentes;Component/Assets/Image/user.png" Width="28" Height="28" Margin="0,5,5,5" />
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</UserControl>
